package com.threeox.httplibrary.callback;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import okhttp3.Response;

/**
 *
 * @ClassName: BitmapCallback
 *
 * @Description: Todo(返回BitMap)
 *
 * @author 赵屈犇
 *
 * @date 创建时间:2016/12/21 11:33
 *
 * @version 1.0
 */
public abstract class BitmapCallback extends Callback<Bitmap> {

    @Override
    public Bitmap parseNetworkResponse(Response response , int id, String url) throws Exception {
        return BitmapFactory.decodeStream(response.body().byteStream());
    }

}
